#!/bin/sh
#
# Run a simple backup  using the compressed option
#   then restore it.
#
TestName="win32-test"
JobName=win32
. scripts/functions

scripts/cleanup
scripts/copy-test-confs
cp scripts/win32-susan-dir.conf bin/susan-dir.conf

change_jobname NightlySave $JobName
start_test

cat <<END_OF_DATA >${cwd}/tmp/bconcmds
@output
messages
@$out ${cwd}/tmp/log1.out
status all
status all
messages
label storage=File volume=TestVolume001
setdebug level=100 dir
run job=$JobName storage=File yes
wait
messages
@#
@# now do a restore
@#
@$out ${cwd}/tmp/log2.out
setdebug level=400 trace=1 client=Tibs
restore where=c:/tmp/xxx select storage=File
unmark *
mark *
done
yes
wait
messages
@output
quit
END_OF_DATA

run_susan
check_for_zombie_jobs storage=File
stop_susan

check_two_logs
# check_restore_diff
dstat=0
end_test
